using System;
using ASPNETVN.PORTAL.Components.UI;
using ASPNETVN.PORTAL.Modules.NEWS.Components;

namespace ASPNETVN.PORTAL.Modules.NEWS.Controls
{
    public partial class FlowManager : AddEditModulePage
    {
       protected void btnAddFlow_Click(object sender, EventArgs e)
        {
            if (txtFlowName.Text.Length > 0)
            {
                Flow flow = new Flow();
                flow.Name = txtFlowName.Text;
                flow.Description = txtFlowDescription.Text;
                flow.ModuleID = this.ModuleID;
                flow.Insert();
                gvFlows.DataBind();
                txtFlowName.Text = txtFlowDescription.Text = string.Empty;
            }
        }

        protected void hfModuleID_Init(object sender, EventArgs e)
        {
            hfModuleID.Value = this.ModuleID.ToString();
        }
    }
}